//
//  TSBaseTableView.swift
//  Pods
//
//  Created by 100Years on 2025/6/17.
//



open class TSBaseTableView: UITableView {
    // MARK: - 初始化
    
    override public init(frame: CGRect, style: UITableView.Style) {
        super.init(frame: frame, style: style)
        commonInit()
    }
    
    required public init?(coder: NSCoder) {
        super.init(coder: coder)
        commonInit()
    }
    
    // MARK: - 公共配置
    private func commonInit() {
        if #available(iOS 11.0, *) {
            contentInsetAdjustmentBehavior = .never
        }

        if #available(iOS 15.0, *) {
            sectionHeaderTopPadding = 0
        }

        if kIsRTL {
            semanticContentAttribute = .forceRightToLeft
        }
        
        separatorStyle = .none
        backgroundColor = .clear

        estimatedRowHeight = 0
        estimatedSectionHeaderHeight = 0
        estimatedSectionFooterHeight = 0

        showsVerticalScrollIndicator = false
        showsHorizontalScrollIndicator = false

        backgroundColor = .clear

        if tableFooterView == nil {
            tableFooterView = UIView(frame: CGRect(x: 0, y: 0, width: 0, height: CGFLOAT_MIN))
        }
    }
}
